﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Npc
    {
        Random ran = new Random();
        public int ShowFist()
        {
            int result = ran.Next(1, 4);
            Console.WriteLine("计算机出了:{0}", IntToFist(result));
            return result;
        }

        private string IntToFist(int input)
        {
            string result = string.Empty;

            switch (input)
            {
                case 1:
                    result = "剪刀";
                    break;
                case 2:
                    result = "石头";
                    break;
                case 3:
                    result = "布";
                    break;
            }
            return result;
        }

    }
}
